#include<bits/stdc++.h>
using namespace std;
int solve() {
  set<int> s;
  s.insert(123);
  s.insert(124);
  auto p = s.insert(42);
  cout<<*p.first<<endl;
  s.erase(p.first);
  cout<<s.front()<<endl;
  cout<<s.back()<<endl;
  return 0;
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0); cout.tie(0);
  // freopen("in.txt","r",stdin);
  // freopen("out.txt","w",stdout);
  int tc; tc = 1;
  for(int t = 1; t <= tc; t++) {
    // cout << "Case #" << t << ": \n";
    solve();
  }
  return 0;
}
